<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <cpn><span slot="left">title</span></cpn>
        <cpn><button slot="middle">button</button></cpn>
        <cpn><i slot="right">haha</i></cpn>
    </div>

    <template id="cpn">
        <div>
            <slot name="left"><span>left</span></slot>
            <slot name="middle"><span>middle</span></slot>
            <slot name="right"><span>right</span></slot>
        </div>
    </template>
    <script src="../vue.js"></script>
    <script>
        const app = new Vue({
            el: '#app',
            components: {
                cpn: {
                    template: '#cpn'
                }
            }

        })
    </script>
</body>
</html>